package cosu.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cosu.dao.UserDao;
import cosu.entry.User;
import cosu.feign.PrivderClient;




@Service
@Transactional //本地事务注解
public class UserServiceImpl {
	
	@Autowired
	private UserDao userDao;
	
	public List<User> find(){
		return userDao.findAll();
	}
	
	@Autowired
	private  PrivderClient client;
	

	public Integer insert(User user,Integer type) {
		userDao.insert(user);
		if(type != null && type == 1) {
			int i =1/0;
		}
		return  1;
	}

}
